package cloud.keveri.gateway.plugin.api.context;

import cloud.keveri.gateway.dto.Rule;
import cloud.keveri.gateway.dto.invoker.ServiceInvoker;
import io.micrometer.core.instrument.Timer;
import lombok.Builder;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * 作者：沈自在
 **/
@Data
@Builder
public class GatewayContext implements Serializable {
    @Serial
    private static final long serialVersionUID = 8668695964617280718L;

    /**
     *
     */
    private Rule rule;

    /**
     *
     */
    private int currentRetryTimes;

    /**
     *
     */
    private boolean gray;

    /**
     *
     */
    private Timer.Sample timerSample;

    /**
     *
     */
    private String protocol;

    /**
     *
     */
    private ServiceInvoker invoker;
}
